<?
$pre    = NULL;
$browse = "/article-gallery/{$this->group}/{$this->page}/{$this->article}/{$this->index}/PAGE"; 
$target = "/article-gallery/browse/group/{$this->group}/page/{$this->page}/article/{$this->article}/index/{$this->index}/show/PAGE";
$jump   = "LoadPageByPattern('{$browse}'.replace('PAGE',d),'v{$this->index}', '{$target}'.replace('PAGE',d))";
?>

 <input value="<?= $this->group ?>" id="gn" type="hidden"/>

<h2 id="v<?= $this->index ?>">
<a href="/">Home</a>
 &#187; <a href="/group/list/group/<?= $this->group ?>/page/<?= $this->page ?>"><?= $this->group ?></a> 
 &#187; 


<? if (sizeof($this->articles) > 1): ?>

  <select id="drp" onchange="LoadPicturebyKey(this.options[this.selectedIndex].value)">

<? foreach ($this->articles as $article):

  if (is_array($pre)&&sizeof ($pre)<10) $pre[]=$article->id; ?>
  <option value="<?= $article->id ?>"
    <? if ($article->id==$this->index): 
     $pre = array($this-index); ?>
    selected
   <? endif  ?>
  ><?= deSubject($article->subject) ?></option>

<? endforeach ?> 

</select>

<? endif ?>



<? if ($this->articleset->media):

  $path = str_replace(DATA_PATH, 'http://192.168.1.19', $this->articleset->media);  ?>  
<a target="_blank" href="<?= $path ?>">Download</a> 

<? else: ?>

[<a href="<?= $this->url(array('controller'=>'request','action'=>'bookmark'))?>"
 ><?= $this->marked ? 'Unbookmark' : 'Bookmark'; ?></a>]

[<a href="javascript:void(0)" onclick="var d=Math.floor($('drp').selectedIndex/8)+1;<?= $jump ?>"
 >Browse</a>]

<? endif ?>



</h2>




<? if ($this->articleset->media):

  $path = str_replace(DATA_PATH, 'http://192.168.1.19', $this->articleset->media);  ?> 
<center>
<video width="640" height="480" controls="controls" src="<?= $path ?>" >
  
Your browser does not support the video tag.
</video> 
</center>
 

<? else: ?>

<?
 
    if (is_array ($this->Persisted))  
        echo $this->partial( "persist.phtml", array("Persisted"=>$this->Persisted)); 


    echo $this->partial ("viewer.phtml", array("group"     => $this->group,
                                                 "item"      => $this->index ,
                                                 "subject"   => $this->subject  ));
 
$db=array();
foreach($this->articles as $v)
    $db[] = '"' . $v->subject . '"';
$db=implode ("\n,", $db);
?>
 

<? endif ?>

<div style="padding:4px;background-color:#F8E4CC;height:120px;">

 <div id="p.subject">Loading...</div>

<? if (sizeof($this->articleset->alsoin) > 1): ?>
<b>Also in: </b>
<br/> 
<?php foreach ($this->articleset->alsoin as $group): ?>

<a
 href='/request/join/groupname/<?= $group ?>' 
 
><?= $group ?></a>

<br/>

<?php endforeach ?> 

 

<? endif ?>

</div>

<script language="javascript">
    var db=[<?= $db ?>];  
    $('p.subject').invoke = function (sender, e) {
        var d=$('drp'), index = d.selectedIndex,
              text = db[index];
        this.innerHTML = text;
    }
    ServiceBus.Subscribe ('OnSlideComplete', $('p.subject'));

</script>

 













